import request from '@/util/request'
import { dealOpts, COURSE } from './../api_type'

// 排课
const courseGetSchedules = (params, opts) => {
  return request.get(dealOpts(COURSE + '/getSchedules', opts), params)
}

const courseGetScheduleInfo = (params, opts) => {
  return request.get(dealOpts(COURSE + '/getScheduleInfo', opts), params)
}

const courseCreateSchedule = (params, opts) => {
  return request.post(dealOpts(COURSE + '/createSchedule', opts), params)
}

const courseModifyeSchedule = (params, opts) => {
  return request.post(dealOpts(COURSE + '/modifySchedule', opts), params)
}

const courseDeleteSchedule = (params, opts) => {
  return request.get(dealOpts(COURSE + '/deleteSchedule', opts), params)
}

export default {
  courseGetSchedules,
  courseGetScheduleInfo,
  courseDeleteSchedule,
  courseCreateSchedule,
  courseModifyeSchedule
}
